<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<title>SourceMapGeneratorV3 (Closure Compiler)</title>
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="SourceMapGeneratorV3 (Closure Compiler)";
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../com/google/debugging/sourcemap/SourceMapGeneratorV2.LineMapEncoder.html" title="class in com.google.debugging.sourcemap"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../com/google/debugging/sourcemap/SourceMapParseException.html" title="class in com.google.debugging.sourcemap"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?com/google/debugging/sourcemap/SourceMapGeneratorV3.html" target="_top">Frames</a></li>
<li><a href="SourceMapGeneratorV3.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">com.google.debugging.sourcemap</div>
<h2 title="Class SourceMapGeneratorV3" class="title">Class SourceMapGeneratorV3</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>com.google.debugging.sourcemap.SourceMapGeneratorV3</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="../../../../com/google/debugging/sourcemap/SourceMapGenerator.html" title="interface in com.google.debugging.sourcemap">SourceMapGenerator</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong">SourceMapGeneratorV3</span>
extends java.lang.Object
implements <a href="../../../../com/google/debugging/sourcemap/SourceMapGenerator.html" title="interface in com.google.debugging.sourcemap">SourceMapGenerator</a></pre>
<div class="block">Collects information mapping the generated (compiled) source back to
 its original source for debugging purposes.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../com/google/debugging/sourcemap/SourceMapGeneratorV3.html#SourceMapGeneratorV3()">SourceMapGeneratorV3</a></strong>()</code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/debugging/sourcemap/SourceMapGeneratorV3.html#addMapping(java.lang.String, java.lang.String, com.google.debugging.sourcemap.FilePosition, com.google.debugging.sourcemap.FilePosition, com.google.debugging.sourcemap.FilePosition)">addMapping</a></strong>(java.lang.String&nbsp;sourceName,
          java.lang.String&nbsp;symbolName,
          <a href="../../../../com/google/debugging/sourcemap/FilePosition.html" title="class in com.google.debugging.sourcemap">FilePosition</a>&nbsp;sourceStartPosition,
          <a href="../../../../com/google/debugging/sourcemap/FilePosition.html" title="class in com.google.debugging.sourcemap">FilePosition</a>&nbsp;startPosition,
          <a href="../../../../com/google/debugging/sourcemap/FilePosition.html" title="class in com.google.debugging.sourcemap">FilePosition</a>&nbsp;endPosition)</code>
<div class="block">Adds a mapping for the given node.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/debugging/sourcemap/SourceMapGeneratorV3.html#appendIndexMapTo(java.lang.Appendable, java.lang.String, java.util.List)">appendIndexMapTo</a></strong>(java.lang.Appendable&nbsp;out,
                java.lang.String&nbsp;name,
                java.util.List&lt;<a href="../../../../com/google/debugging/sourcemap/SourceMapSection.html" title="class in com.google.debugging.sourcemap">SourceMapSection</a>&gt;&nbsp;sections)</code>
<div class="block">Appends the index source map to the given buffer.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/debugging/sourcemap/SourceMapGeneratorV3.html#appendTo(java.lang.Appendable, java.lang.String)">appendTo</a></strong>(java.lang.Appendable&nbsp;out,
        java.lang.String&nbsp;name)</code>
<div class="block">Writes out the source map in the following format (line numbers are for
 reference only and are not part of the format):

 1.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/debugging/sourcemap/SourceMapGeneratorV3.html#mergeMapSection(int, int, java.lang.String)">mergeMapSection</a></strong>(int&nbsp;line,
               int&nbsp;column,
               java.lang.String&nbsp;mapSectionContents)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/debugging/sourcemap/SourceMapGeneratorV3.html#reset()">reset</a></strong>()</code>
<div class="block">Resets the source map for reuse.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/debugging/sourcemap/SourceMapGeneratorV3.html#setStartingPosition(int, int)">setStartingPosition</a></strong>(int&nbsp;offsetLine,
                   int&nbsp;offsetIndex)</code>
<div class="block">Sets the source code that exists in the buffer for which the
 generated code is being generated.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/debugging/sourcemap/SourceMapGeneratorV3.html#setWrapperPrefix(java.lang.String)">setWrapperPrefix</a></strong>(java.lang.String&nbsp;prefix)</code>
<div class="block">Sets the prefix used for wrapping the generated source file before
 it is written.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/debugging/sourcemap/SourceMapGeneratorV3.html#validate(boolean)">validate</a></strong>(boolean&nbsp;validate)</code>
<div class="block">Whether to perform additional validation on the source map.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a name="SourceMapGeneratorV3()">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>SourceMapGeneratorV3</h4>
<pre>public&nbsp;SourceMapGeneratorV3()</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="reset()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>reset</h4>
<pre>public&nbsp;void&nbsp;reset()</pre>
<div class="block">Resets the source map for reuse. A reset needs to be called between
 each generated output file.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../com/google/debugging/sourcemap/SourceMapGenerator.html#reset()">reset</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../com/google/debugging/sourcemap/SourceMapGenerator.html" title="interface in com.google.debugging.sourcemap">SourceMapGenerator</a></code></dd>
</dl>
</li>
</ul>
<a name="validate(boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>validate</h4>
<pre>public&nbsp;void&nbsp;validate(boolean&nbsp;validate)</pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../../com/google/debugging/sourcemap/SourceMapGenerator.html#validate(boolean)">SourceMapGenerator</a></code></strong></div>
<div class="block">Whether to perform additional validation on the source map.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../com/google/debugging/sourcemap/SourceMapGenerator.html#validate(boolean)">validate</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../com/google/debugging/sourcemap/SourceMapGenerator.html" title="interface in com.google.debugging.sourcemap">SourceMapGenerator</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>validate</code> - Whether to perform (potentially costly) validation on the
 generated source map.</dd></dl>
</li>
</ul>
<a name="setWrapperPrefix(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setWrapperPrefix</h4>
<pre>public&nbsp;void&nbsp;setWrapperPrefix(java.lang.String&nbsp;prefix)</pre>
<div class="block">Sets the prefix used for wrapping the generated source file before
 it is written. This ensures that the source map is adjusted for the
 change in character offsets.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../com/google/debugging/sourcemap/SourceMapGenerator.html#setWrapperPrefix(java.lang.String)">setWrapperPrefix</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../com/google/debugging/sourcemap/SourceMapGenerator.html" title="interface in com.google.debugging.sourcemap">SourceMapGenerator</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>prefix</code> - The prefix that is added before the generated source code.</dd></dl>
</li>
</ul>
<a name="setStartingPosition(int, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setStartingPosition</h4>
<pre>public&nbsp;void&nbsp;setStartingPosition(int&nbsp;offsetLine,
                       int&nbsp;offsetIndex)</pre>
<div class="block">Sets the source code that exists in the buffer for which the
 generated code is being generated. This ensures that the source map
 accurately reflects the fact that the source is being appended to
 an existing buffer and as such, does not start at line 0, position 0
 but rather some other line and position.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../com/google/debugging/sourcemap/SourceMapGenerator.html#setStartingPosition(int, int)">setStartingPosition</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../com/google/debugging/sourcemap/SourceMapGenerator.html" title="interface in com.google.debugging.sourcemap">SourceMapGenerator</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>offsetLine</code> - The index of the current line being printed.</dd><dd><code>offsetIndex</code> - The column index of the current character being printed.</dd></dl>
</li>
</ul>
<a name="addMapping(java.lang.String, java.lang.String, com.google.debugging.sourcemap.FilePosition, com.google.debugging.sourcemap.FilePosition, com.google.debugging.sourcemap.FilePosition)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addMapping</h4>
<pre>public&nbsp;void&nbsp;addMapping(java.lang.String&nbsp;sourceName,
              @Nullable
              java.lang.String&nbsp;symbolName,
              <a href="../../../../com/google/debugging/sourcemap/FilePosition.html" title="class in com.google.debugging.sourcemap">FilePosition</a>&nbsp;sourceStartPosition,
              <a href="../../../../com/google/debugging/sourcemap/FilePosition.html" title="class in com.google.debugging.sourcemap">FilePosition</a>&nbsp;startPosition,
              <a href="../../../../com/google/debugging/sourcemap/FilePosition.html" title="class in com.google.debugging.sourcemap">FilePosition</a>&nbsp;endPosition)</pre>
<div class="block">Adds a mapping for the given node.  Mappings must be added in order.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../com/google/debugging/sourcemap/SourceMapGenerator.html#addMapping(java.lang.String, java.lang.String, com.google.debugging.sourcemap.FilePosition, com.google.debugging.sourcemap.FilePosition, com.google.debugging.sourcemap.FilePosition)">addMapping</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../com/google/debugging/sourcemap/SourceMapGenerator.html" title="interface in com.google.debugging.sourcemap">SourceMapGenerator</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>startPosition</code> - The position on the starting line</dd><dd><code>endPosition</code> - The position on the ending line.</dd><dd><code>sourceName</code> - The file name to use in the generate source map
     to represent this source.</dd><dd><code>symbolName</code> - The symbol name associated with this position in the
     source map.</dd><dd><code>sourceStartPosition</code> - The starting position in the original source for
     represented range outputStartPosition to outputEndPosition in the
     generated file.</dd></dl>
</li>
</ul>
<a name="mergeMapSection(int, int, java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>mergeMapSection</h4>
<pre>public&nbsp;void&nbsp;mergeMapSection(int&nbsp;line,
                   int&nbsp;column,
                   java.lang.String&nbsp;mapSectionContents)
                     throws <a href="../../../../com/google/debugging/sourcemap/SourceMapParseException.html" title="class in com.google.debugging.sourcemap">SourceMapParseException</a></pre>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../com/google/debugging/sourcemap/SourceMapParseException.html" title="class in com.google.debugging.sourcemap">SourceMapParseException</a></code></dd></dl>
</li>
</ul>
<a name="appendTo(java.lang.Appendable, java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>appendTo</h4>
<pre>public&nbsp;void&nbsp;appendTo(java.lang.Appendable&nbsp;out,
            java.lang.String&nbsp;name)
              throws java.io.IOException</pre>
<div class="block">Writes out the source map in the following format (line numbers are for
 reference only and are not part of the format):

 1.  {
 2.    version: 3,
 3.    file: "out.js",
 4.    lineCount: 2,
 5.    sourceRoot: "",
 6.    sources: ["foo.js", "bar.js"],
 7.    names: ["src", "maps", "are", "fun"],
 8.    mappings: "a;;abcde,abcd,a;"
 9.  }

 Line 1: The entire file is a single JSON object
 Line 2: File revision (always the first entry in the object)
 Line 3: The name of the file that this source map is associated with.
 Line 4: The number of lines represented in the source map.
 Line 5: An optional source root, useful for relocating source files on a
     server or removing repeated prefix values in the "sources" entry.
 Line 6: A list of sources used by the "mappings" entry relative to the
     sourceRoot.
 Line 7: A list of symbol names used by the "mapping" entry.  This list
     may be incomplete.
 Line 8: The mappings field.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../com/google/debugging/sourcemap/SourceMapGenerator.html#appendTo(java.lang.Appendable, java.lang.String)">appendTo</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../com/google/debugging/sourcemap/SourceMapGenerator.html" title="interface in com.google.debugging.sourcemap">SourceMapGenerator</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>out</code> - The stream to which the map will be appended.</dd><dd><code>name</code> - The name of the generated source file that this source map
   represents.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd></dl>
</li>
</ul>
<a name="appendIndexMapTo(java.lang.Appendable, java.lang.String, java.util.List)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>appendIndexMapTo</h4>
<pre>public&nbsp;void&nbsp;appendIndexMapTo(java.lang.Appendable&nbsp;out,
                    java.lang.String&nbsp;name,
                    java.util.List&lt;<a href="../../../../com/google/debugging/sourcemap/SourceMapSection.html" title="class in com.google.debugging.sourcemap">SourceMapSection</a>&gt;&nbsp;sections)
                      throws java.io.IOException</pre>
<div class="block">Appends the index source map to the given buffer.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../com/google/debugging/sourcemap/SourceMapGenerator.html#appendIndexMapTo(java.lang.Appendable, java.lang.String, java.util.List)">appendIndexMapTo</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../com/google/debugging/sourcemap/SourceMapGenerator.html" title="interface in com.google.debugging.sourcemap">SourceMapGenerator</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>out</code> - The stream to which the map will be appended.</dd><dd><code>name</code> - The name of the generated source file that this source map
   represents.</dd><dd><code>sections</code> - An ordered list of map sections to include in the index.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../com/google/debugging/sourcemap/SourceMapGeneratorV2.LineMapEncoder.html" title="class in com.google.debugging.sourcemap"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../com/google/debugging/sourcemap/SourceMapParseException.html" title="class in com.google.debugging.sourcemap"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?com/google/debugging/sourcemap/SourceMapGeneratorV3.html" target="_top">Frames</a></li>
<li><a href="SourceMapGeneratorV3.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
